/**
 * @project Devkits
 * @file MainGui.h
 * @author rui.liang (rui.liang@ruhnix.com)
 * @date 2022/11/29 01:32:08
 */

#ifndef DEVKITS_GUI_H
#define DEVKITS_GUI_H

#include <QApplication>
#include <utility>

#include "GuiGlobal.h"
#include "Homepage.h"

class LIBGUI_EXPORT MainGui {
  public:
    using Ptr = std::shared_ptr<MainGui>;
    static Ptr create();

    /**
     * Start application
     * @param app
     * @return
     */
    int exec(QApplication &app);

    MainGui() = delete;

  private:
    explicit MainGui(MainWindow::Ptr window) : m_window(std::move(window)) {};
    MainWindow::Ptr m_window;
};

#endif // DEVKITS_GUI_H
